﻿using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace Api.Catalog.Controllers
{
    [Route("api/[controller]")]
    [ApiController]
    public class UserLoginController : ControllerBase
    {
      
        [HttpPost]
        public IActionResult Login(User user)
        {
            if (user.UserName == "admin" && user.Password == "123456")
            {
                return Ok();
            }
            else
            {

                return Ok("用户名密码不正确");
            }

        }
    }


    public class User
    {

        public string UserName { get; set; }

        public string Password { get; set; }
    }
}
